<%= polaris_frame do |frame| %>
  <%= polaris_page(title: "Toast example") do %>
    <%= polaris_button(data: {
      controller: "polaris",
      target: "#demo-toast",
      action: "polaris#showToast",
    }) { "Show toast" } %>
  <% end %>

  <% frame.with_toasts do %>
    <%= polaris_toast(
      id: "demo-toast",
      hidden: true,
      duration: 1000
    ) { "Message sent" } %>
  <% end %>
<% end %>
